package cn.elves.model.auth.entity.dto;

import cn.elves.model.auth.entity.po.Role;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 *
 * @TableName tb_role
 */
@TableName(value ="tb_role")
@Data
public class RoleDTO implements Serializable {
    /**
     *
     */
    @TableId
    private Long id;

    /**
     *
     */
    private String description;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


    public Role toRole(){
        Role role = new Role();
        BeanUtils.copyProperties(this,role);
        return role;
    }
}
